How elements are built from tags, content and attributes, and which attributes apply everywhere.
An HTML element is more than a tag: it's the opening tag, its content, and the closing tag together, while attributes are name-value pairs inside the opening tag that configure behavior or provide extra information. Some elements are void (img, input, br, meta) and have no content or closing tag at all. Global attributes like id, class, style, title, lang, hidden, tabindex and data-* can be placed on any element, whereas others such as href, src or type only make sense on specific ones.
A subtle area interviewers probe is boolean attributes and the id versus class distinction. A boolean attribute like disabled or checked is true simply by being present — disabled="false" still disables the element. Likewise, an id must be unique per document and is used for anchors, labels and scripting hooks, while class is reusable. Custom data-* attributes give you a standards-friendly way to attach data to elements without inventing invalid attributes.
What you'll walk away knowing